package com.ruoyi.bookSys.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 图书信息对象 book_info
 * 
 * @author liugang
 * @date 2025-10-14
 */
public class BookInfo extends BaseEntity
{    private List<BookBorrow> bookBorrowList;

    private static final long serialVersionUID = 1L;
    public List<BookBorrow> getBookBorrowList() {
        return bookBorrowList;
    }
    /** 图书ID（主键） */
    private Long bookId;

    /** ISBN编号（唯一，图书国际标准编号） */
    @Excel(name = "ISBN编号", readConverterExp = "唯=一，图书国际标准编号")
    private String bookIsbn;

    /** 图书名称 */
    @Excel(name = "图书名称")
    private String bookName;

    /** 所属分类ID（关联book_category表） */
    @Excel(name = "所属分类ID", readConverterExp = "关=联book_category表")
    private Long categoryId;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 出版社 */
    @Excel(name = "出版社")
    private String publisher;

    /** 出版日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出版日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishDate;

    /** 图书简介 */
    @Excel(name = "图书简介")
    private String bookDesc;

    /** 图书封面URL（若依文件上传后存储路径） */
    @Excel(name = "图书封面URL", readConverterExp = "若=依文件上传后存储路径")
    private String bookCover;

    /** 总库存数量 */
    @Excel(name = "总库存数量")
    private Long totalNum;

    /** 可借数量（=总库存-已借出数量） */
    @Excel(name = "可借数量", readConverterExp = "==总库存-已借出数量")
    private Long availableNum;

    /** 图书定价 */
    @Excel(name = "图书定价")
    private BigDecimal price;

    /** 排序号（用于图书列表展示顺序） */
    @Excel(name = "排序号", readConverterExp = "用=于图书列表展示顺序")
    private Long sort;

    /** 删除标志（0=未删除，1=已删除） */
    private String delFlag;

    public void setBookId(Long bookId) 
    {
        this.bookId = bookId;
    }

    public Long getBookId() 
    {
        return bookId;
    }
    public void setBookIsbn(String bookIsbn) 
    {
        this.bookIsbn = bookIsbn;
    }

    public String getBookIsbn() 
    {
        return bookIsbn;
    }
    public void setBookName(String bookName) 
    {
        this.bookName = bookName;
    }

    public String getBookName() 
    {
        return bookName;
    }
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }
    public void setPublisher(String publisher) 
    {
        this.publisher = publisher;
    }

    public String getPublisher() 
    {
        return publisher;
    }
    public void setPublishDate(Date publishDate) 
    {
        this.publishDate = publishDate;
    }

    public Date getPublishDate() 
    {
        return publishDate;
    }
    public void setBookDesc(String bookDesc) 
    {
        this.bookDesc = bookDesc;
    }

    public String getBookDesc() 
    {
        return bookDesc;
    }
    public void setBookCover(String bookCover) 
    {
        this.bookCover = bookCover;
    }

    public String getBookCover() 
    {
        return bookCover;
    }
    public void setTotalNum(Long totalNum) 
    {
        this.totalNum = totalNum;
    }

    public Long getTotalNum() 
    {
        return totalNum;
    }
    public void setAvailableNum(Long availableNum) 
    {
        this.availableNum = availableNum;
    }

    public Long getAvailableNum() 
    {
        return availableNum;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setSort(Long sort) 
    {
        this.sort = sort;
    }

    public Long getSort() 
    {
        return sort;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("bookId", getBookId())
            .append("bookIsbn", getBookIsbn())
            .append("bookName", getBookName())
            .append("categoryId", getCategoryId())
            .append("author", getAuthor())
            .append("publisher", getPublisher())
            .append("publishDate", getPublishDate())
            .append("bookDesc", getBookDesc())
            .append("bookCover", getBookCover())
            .append("totalNum", getTotalNum())
            .append("availableNum", getAvailableNum())
            .append("price", getPrice())
            .append("sort", getSort())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
